﻿package Classes.Elements{
	import flash.display.*;
	import flash.events.*;
	import flash.utils.*;
	
	import Classes.*;
	import Classes.Utils.*;
	import Classes.Interface.*;
	import Classes.Layers.*;
	import Classes.Elements.*;
	
	public class Aircraft extends Aero implements IFire{		
		public var bulletLayer:Layer;
		//是否可以开火
		public var fireable:Boolean;
		//武器种类
		public var weaponType:Object;
		//武器数量
		protected var numWeapen:int;		
		//构造函数
		public function Aircraft (){			
			speed = 1;
			tmpxspeed 	= 0;
			tmpyspeed 	= 0;
			//用弱引用的方式添加事件侦听器
			addEventListener(Event.ENTER_FRAME,onEnterFrame,false,0,true);
		}
		//当播放桢时执行move方法
		override protected function onEnterFrame(e:Event):void{
			if(isInRange())
				move();
		}		
		//开火
		public function fire():void{			
		}
		override protected function move():void{			
			this.y += speed;
			hitTest();
		}
	}
}